home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / arts / socketconnection.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-09-10  |  1.6 KB  |  65 lines

  1.     /*
  2.  
  3.     Copyright (C) 2000 Stefan Westerfeld
  4.                        stefan@space.twc.de
  5.  
  6.     This library is free software; you can redistribute it and/or
  7.     modify it under the terms of the GNU Library General Public
  8.     License as published by the Free Software Foundation; either
  9.     version 2 of the License, or (at your option) any later version.
  10.   
  11.     This library is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.     Library General Public License for more details.
  15.    
  16.     You should have received a copy of the GNU Library General Public License
  17.     along with this library; see the file COPYING.LIB.  If not, write to
  18.     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.     Boston, MA 02111-1307, USA.
  20.  
  21.     */
  22.  
  23. /*
  24.  * BC - Status (2002-03-08): SocketConnection
  25.  *
  26.  * None of these classes is considered part of the public API. Do NOT use it
  27.  * in your apps. No BC guaranteed.
  28.  */
  29.  
  30. #ifndef SOCKETCONNECTION_H
  31. #define SOCKETCONNECTION_H
  32.  
  33. #include "buffer.h"
  34. #include "iomanager.h"
  35. #include "connection.h"
  36. #include <list>
  37. #include <string>
  38.  
  39. namespace Arts {
  40.  
  41. class SocketConnection :public Connection, public IONotify {
  42. protected:
  43.     std::string serverID;
  44.     int fd;
  45.     bool _broken;
  46.  
  47.     std::list<Buffer *> pending;
  48.     void writeBuffer(Buffer *buffer);
  49.  
  50.     SocketConnection();
  51.  
  52. public:
  53.     SocketConnection(int _fd);
  54.  
  55.     void qSendBuffer(Buffer *buffer);
  56.     void notifyIO(int _fd, int types);
  57.  
  58.     void drop();
  59.     bool broken();
  60. };
  61.  
  62. }
  63.  
  64. #endif /* SOCKETCONNECTION_H */
  65.